home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / p61lib.lha / P61Lib / include / inline / player61.h
C/C++ Source or Header  |  1995-11-07  |  2KB  |  87 lines

  1. #ifndef _INLINE_PLAYER61_H
  2. #define _INLINE_PLAYER61_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL extern struct Player61Base*  Player61Base;
  11. #endif
  12. #ifndef BASE_PAR_DECL
  13. #define BASE_PAR_DECL
  14. #define BASE_PAR_DECL0 void
  15. #endif
  16. #ifndef BASE_NAME
  17. #define BASE_NAME Player61Base
  18. #endif
  19.  
  20. static __inline struct p61status * 
  21. P61_Inquire (BASE_PAR_DECL0)
  22. {
  23.   BASE_EXT_DECL
  24.   register struct p61status *  _res  __asm("d0");
  25.   register struct Player61Base* a6 __asm("a6") = BASE_NAME;
  26.   __asm __volatile ("jsr a6@(-0x36)"
  27.   : "=r" (_res)
  28.   : "r" (a6)
  29.   : "a0","a1","d0","d1", "memory");
  30.   return _res;
  31. }
  32. static __inline LONG 
  33. P61_Play (BASE_PAR_DECL a,b,c)
  34. {
  35.   BASE_EXT_DECL
  36.   register LONG  _res  __asm("d0");
  37.   register struct Player61Base* a6 __asm("a6") = BASE_NAME;
  38.   register a __asm("A0") = a;
  39.   register b __asm("D1") = b;
  40.   register c __asm("D0") = c;
  41.   __asm __volatile ("jsr a6@(-0x1e)"
  42.   : "=r" (_res)
  43.   : "r" (a6), "r" (A0), "r" (D1), "r" (D0)
  44.   : "A0","D0","D1","a0","a1","d0","d1", "memory");
  45.   return _res;
  46. }
  47. static __inline void 
  48. P61_SetPos (BASE_PAR_DECL a)
  49. {
  50.   BASE_EXT_DECL
  51.   register struct Player61Base* a6 __asm("a6") = BASE_NAME;
  52.   register a __asm("D0") = a;
  53.   __asm __volatile ("jsr a6@(-0x2a)"
  54.   : /* no output */
  55.   : "r" (a6), "r" (D0)
  56.   : "D0","a0","a1","d0","d1", "memory");
  57. }
  58. static __inline void 
  59. P61_SetVol (BASE_PAR_DECL a)
  60. {
  61.   BASE_EXT_DECL
  62.   register struct Player61Base* a6 __asm("a6") = BASE_NAME;
  63.   register a __asm("D0") = a;
  64.   __asm __volatile ("jsr a6@(-0x30)"
  65.   : /* no output */
  66.   : "r" (a6), "r" (D0)
  67.   : "D0","a0","a1","d0","d1", "memory");
  68. }
  69. static __inline void 
  70. P61_Stop (BASE_PAR_DECL0)
  71. {
  72.   BASE_EXT_DECL
  73.   register struct Player61Base* a6 __asm("a6") = BASE_NAME;
  74.   __asm __volatile ("jsr a6@(-0x24)"
  75.   : /* no output */
  76.   : "r" (a6)
  77.   : "a0","a1","d0","d1", "memory");
  78. }
  79. #undef BASE_EXT_DECL
  80. #undef BASE_PAR_DECL
  81. #undef BASE_PAR_DECL0
  82. #undef BASE_NAME
  83.  
  84. __END_DECLS
  85.  
  86. #endif /* _INLINE_PLAYER61_H */
  87.